Application Package Deployment Utility |
|
The Application Package Deployment utility is a collection of ant tasks which facilitates the deployment of application packages. It also helps in the creation and management of Service Group, Service Container and Database configuration. Using these Ant tasks, you can also automate some of the manual tasks performed while loading application packages.
Note: This utility supports the new application package (.cap) deployment format and does not cater to the application package format of the previous versions. |
List of Ant Tasks
Name |
Details |
---|---|
Application Package deployment task |
|
Application Package undeployment task |
|
Database configuration creation task |
|
Database configuration deletion task |
|
Service Group creation task |
|
Service Group deletion task |
|
Service Container creation task |
|
Service Container deletion task |
|
Connection Point creation task |
|
Connection Point deletion task |
|
Task to clone service containers |
Configuring the server to use the Ant Tasks
- The user, who is executing the script from command prompt or terminal client:
- Must be present either in LDAP as a Process Platform user or one of the existing user's OS identity must be mapped with this user
- Must have setupUser role assigned
- Based on your Operating System, do the following configurations:
- On Windows:
- Create environment variable called CORDYS_HOME and point it to <Process_Platform_Installation_Directory>/InstanceName.
- Add cordyscp.jar to system classpath.
- Add Process Platform libraries path (CORDYS_HOME/lib) to PATH.
- On Linux:
- Create environment variable called CORDYS_HOME and point it to <Process_Platform_Installation_Directory>/InstanceName.
- Add cordyscp.jar to system classpath.
- Add Process Platform libraries (CORDYS_HOME/lib) to LD_LIBRARY_PATH.
- On Windows:
- Using the Ant tasks in the build script file.
The above Ant tasks are custom tasks provided for use along with the Process Platform installation. Since these tasks are not part of the standard Ant utility, they need to be specifically included into the Ant script for the task to be invoked correctly.
- Include the following lines in your build script file.
<property environment="env"/> <property name="bop.install.dir" value="${env.CORDYS_HOME}"/> <taskdef resource="com/cordys/deployment/ant/taskdef.xml" classpath="${bop.install.dir}/components/anttasks/anttasks.jar" />
- Include the following lines in your build script file.
- Viewing the detailed error messages to debug these ant tasks.
Detailed logging for the utility is available through the Log4j framework. The Log4jConfiguration.xml file is available at the location CORDYS_HOME/config and can be viewed in the console or in a logfile as shown below:
As per requirement, add one of the the following to the Log4jConfiguration.xmlfile
- View in console
<appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n" /> </layout> </appender> <category name="com.cordys.deployment.ant"> <priority value="debug"/> <appender-ref ref="ConsoleAppender"/> </category>
The messages would be printed to the console. - View in logfile
<category name="com.cordys.deployment.ant"> <priority value="debug"/> </category>
- View in console
The messages would be logged to the file General.xml located at CORDYS_HOME/Logs folder.
Sample Build file
<project basedir="." default="testAll" name="Test-Antscripts"> <!-- Run tests based on these properties --> <property file="test.properties"/> <!-- Add the task definition to include the custom tasks --> <property environment="env"/> <property name="bop.install.dir" value="${env.CORDYS_HOME}"/> <path id="anttask.classpath"> <pathelement location="${bop.install.dir}/components/anttasks/anttasks.jar"/> </path> <taskdef resource="com/cordys/deployment/ant/taskdef.xml"> <classpath refid="anttask.classpath"/> </taskdef> <!-- call the tests --> <target name="testAll"> <antcall target="testApplicationPackageDeploy"/> <antcall target="testApplicationPackageUndeploy"/> </target> <target name="testApplicationPackageDeploy"> <deployapplicationpackage buildNumber="${cordys.buildnumber}" failonerror="${cordys.failonerror}" ldapRoot="${cordys.ldaproot}" name="${cordys.applicationpackagename}" port="${cordys.port}" protocol="${cordys.webprotocol}" revertOnfailure="${cordys.revertonfailure}" server="${cordys.server}" timeout="${cordys.timeout}" version="${cordys.version}" webserver="${cordys.webserver}"/> </target> <target name="testApplicationPackageUndeploy"> <undeployapplicationpackage failonerror="${cordys.failonerror}" ldapRoot="${cordys.ldaproot}" name="${cordys.applicationpackagename}" server="${cordys.server}"/> </target> </project>
#General properties. cordys.server=dummy cordys.ldaproot=cn=cordys,cn=defaultInst,o=cordys.com cordys.failonerror=true #Package Deployment properties cordys.webserver= cordys.webprotocol=http cordys.port=80 cordys.applicationpackagename=ABC cordys.timeout=30000 cordys.revertonfailure=false cordys.version=2.0 cordys.buildnumber=0